package com.laicunba.service;

import java.math.BigDecimal;
import java.util.List;

import com.laicunba.pojo.CashCouponDO;
import com.laicunba.pojo.FinancingTargetBidDO;
import com.laicunba.pojo.FinancingTargetDO;
import com.laicunba.pojo.UserDO;
import com.laicunba.pojo.vo.CashCouponVO;

public interface CashCouponService extends BaseService {

	List<CashCouponDO> findUseableCashCoupon(String userId);

	/**
	 * 检查该现金券,在当前条件下是否能使用
	 * 
	 * @param bidDO
	 * @param cashCouponDO
	 * @return
	 */
	boolean testForConditions(FinancingTargetBidDO bidDO, CashCouponDO cashCouponDO, FinancingTargetDO financingTargetDO);

	List<CashCouponDO> findCashCoupons(String userId);

	List<CashCouponVO> findCashCouponVOs(String id);

	List<UserDO> findNoSendUsers(String userType, String couponDefId, int limit);

	boolean testForConditions(CashCouponDO cashCouponDO, UserDO buyer, FinancingTargetDO financingTargetDO, BigDecimal buyAmt);

}
